package com.chixing.controller;

import com.chixing.pojo.Customer;
import com.chixing.service.CustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpSession;

@Controller
public class CustomerController {
@Autowired
    private CustomerService customerService;

    @GetMapping("cust/logut")
    public String logut(HttpSession session){
        session.removeAttribute("loginCustomer");
        return "redirect:/index.jsp";  //重定向
    }
}
